{template 'header', $template}
<div id="head-bar">
<div class="head-bar">
<div class="head-bar-back">
<a href="{$back_link}"><img src="{DT_MOB}static/img/icon-back.png" width="24" height="24"/><span>返回</span></a>
</div>
<div class="head-bar-title">{$head_name}</div>
</div>
<div class="head-bar-fix"></div>
</div>
{if $itemid}
<div class="main">
	<div class="title"><strong>{$title}</strong></div>
	<div class="info">{$editdate}{if $MOD[hits]}&nbsp;&nbsp;浏览:<span id="hits">{$hits}</span>{/if}</div>
	{if $pass}
	<div class="album" style="margin:0;">
		<div id="album" style="margin:0;"><img src="{$P[big]}" id="photo_{$itemid}" style="width:100%;" onclick="photo_next({$itemid})"/></div><div style="line-height:30px;font-size:18px;"><span id="photo_page_{$itemid}">{$page}</span> / {$items}</div>
	</div>
	<div style="display:none;">
	{loop $T $i $p}
	<div id="image_{$itemid}_{$i}">{$p[big]}</div>
	<div id="intro_{$itemid}_{$i}">{$p[introduce]}</div>
	{/loop}
	<div id="cur_{$itemid}">{$page}</div>
	<div id="max_{$itemid}">{$items}</div>
	</div>
	<script type="text/javascript" src="{DT_MOB}static/js/photo.js"></script>
	<script type="text/javascript">
	$(function(){
		$('#photo_{$itemid}').on('swipeleft',function(){
			photo_next({$itemid});
		});
		$('#photo_{$itemid}').on('swiperight',function(){
			photo_prev({$itemid});
		});
	});
	</script>
	<div id="photo_intro" class="content">{$P[introduce]}</div>
	{if $content}<div class="content">{$content}</div>{/if}
	{else}
		<div class="content">
		此{$MOD[name]}需要验证，{if $open == 2}请输入访问密码{elseif $open == 1}请回答{$question}{/if}
		<form id="photo-form">
		<input type="hidden" name="itemid" value="{$itemid}"/>
		<input type="hidden" name="action" value="verify"/>
		<div style="border:#D8D8D8 1px solid;margin:10px 0;padding:2px 6px;border-radius:4px;"><input type="text" name="key" id="key" style="width:100%;height:28px;line-height:28px;border:none;font-size:14px;padding:0;" onblur="window.scrollTo(0,0);"/></div>
		<div class="btn-green" onclick="Dphoto();">立即验证</div>
		</form>
		</div>
		<script type="text/javascript">
		function Dphoto() {
			if($('#key').val().length < 1) {
				Dtoast('请填写验证信息');
				return false;
			}
			$.post('{$MOD[mobile]}show.php', $('#photo-form').serialize(), function(data) {
				if(data == 'ok') {
					Dtoast('验证成功');
					setTimeout(function() {
						window.location.reload();
					}, 1000);
				} else {
					Dtoast('验证失败，请重试');
				}
			});
		}
		</script>
	{/if}
	{if $MOD[fee_award]}
	<div class="award"><a href="{$MODULE[2][mobile]}award.php?mid={$moduleid}&itemid={$itemid}" rel="external"><div>打赏</div></a></div>
	{/if}
</div>
{else}
{if $lists}
{loop $lists $v}
<div class="list-img">
<a href="{$v[linkurl]}"><img src="{if $v[thumb]}{$v[thumb]}{else}{DT_MOB}static/img/80x60.png{/if}" width="80" height="60" alt="" onerror="this.src='{DT_MOB}static/img/80x60.png';"/></a>
<ul>
<li><a href="{$v[linkurl]}"><strong>{$v[title]}</strong></a></li>
<li><em class="f_r">{timetodate($v[addtime], 5)}</em><span>{$v[items]} 张图片</span></li>
</ul>
</div>
{/loop}
{else}
{template 'empty', 'chip'}
{/if}
{if $pages}<div class="pages">{$pages}</div>{/if}
{/if}
{template 'footer', $template}